<?php  if (!defined("IS_INITPHP")) exit("Access Denied!");  /* INITPHP Version 1.0 ,Create on 2015-11-14 16:56:20, compiled from D:\chendeben\zendwork\huodongxun/app/template/huodongxun/home/user/add_active.html */ ?>
<!DOCTYPE html   "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>发布活动</title>
<link href="/static/css/wrap.css" rel="stylesheet" type="text/css" />
<link href="/static/css/common.css" rel="stylesheet" type="text/css" />
<link href="/static/css/header.css" rel="stylesheet" type="text/css" />
<link href="/static/css/sec_main.css" rel="stylesheet" type="text/css" />
<link href="/static/css/footer.css" rel="stylesheet" type="text/css" />
<link href="/adminlte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
</head>
<body>
	<!--头部  开始 -->
	<div class="header_top">
		<div class="header">
			<!-- 导航栏  开始-->
			<div class="nav">
				<div class="logo"></div>
				<!-- 菜单 -->
				<div class="menu">
					<ul>
			          <li class="mitem"> <a href="/" >首页</a> </li>
			          <li class="mitem"> <a href="/home/user/active_list" >活动</a> </li>
			          <li class="mitem"> <a href="#" >直播</a> </li>
			          <li class="mitem"> <a href="#" >关注</a> </li>
					</ul>
				</div>
				<!-- 登录 -->
				<div class="login">  
				<?php if ($username!="") { ?>
				 <a href="/home/user/info"><?php echo $username;?></a>
				 <?php } else { ?>
				 <a href="login.html">登录</a>| <a href="login.html">注册</a>
				 <?php } ?> 
				 </div>
				<!-- 发送活动 -->
				<div class="send_activity">
					<a href="/home/user/add_active">发布活动 </a>

				</div>
			</div>
			<!-- 导航栏  结束-->
		</div>
	</div>
	<!--头部  结束 -->
	<!--身体  开始 -->
	<div class="fb_content">
		<div class="container-fluid">
			<div class="row " style="margin-top: 10px; width: 100%">
				<div class="col-xs-12">
					<form class="form-horizontal" action="" method="post" name="myform" id="myform">
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="title"> 活动主题 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-12 non-lrpad">
									<input type="text" name="title" id="title" class="form-control" value="" />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="start_time"> 活动时间 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-12 non-lrpad">
									<input class="setdate" type="text" name="start_time" id="start_time" value="<?php echo date('Y-m-d H:i:00') ?>" /> - <input class="setdate" type="text" name="end_time" id="end_time" value="<?php echo date('Y-m-d H:i:00',time()+86400*3) ?>" />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="reg_endtime"> 报名截止时间 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-6 non-lrpad">
									<input type="text"  name="reg_endtime" id="reg_endtime" class="setdate form-control" value="<?php echo date('Y-m-d H:i:00',strtotime('+1 month')) ?>" />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="address"> 活动地点 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-12 non-lrpad">
									<input type="text" name="address" id="address" class="form-control" value="" />
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="content"> 标签 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-8 input-group">
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="课程"> 课程 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="优惠"> 优惠 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="运动"> 运动 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="娱乐"> 娱乐 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="电影"> 电影 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="社交"> 社交 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="校园"> 校园 </span> 
									<span><input style="margin-left: 5px; margin-right: 5px;" class="tag" type="checkbox" name="tag[]" value="公益"> 公益 </span>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="container"> 活动详情 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-12 non-lrpad">
									<script id="container" name="content"></script>
								</div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="content"> 报名信息 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-5 input-group">
									<?php foreach ($reginfo as $k=>$v) { ?>
									<span><input style="margin-left: 5px; margin-right: 5px;" type="checkbox" name="need_info[]" value="<?php echo $v['field'];?>"> <?php echo $v['title'];?> </span>
									<?php } ?>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-2 non-rpad control-label" for="content"> 收费项目 ：</label>
							<div class="col-xs-10 non-lrpad">
								<div class="col-xs-5 input-group">
									<?php foreach ($chargeinfo as $k=>$v) { ?>
									<span><input style="margin-left: 5px; margin-right: 5px;" type="checkbox" name="charge_info[]" value="<?php echo $v['field'];?>"> <?php echo $v['title'];?> </span>
									<?php } ?>
								</div>
							</div>
						</div>
						<div class="form-group">
							<input type="hidden" name="do" value='add'> <input class="col-md-26 btn btn-info" type="submit" value="提交" />
						</div>

					</form>
				</div>
			</div>
		</div>
	</div>
	<!--身体  结束 -->

	<!--底部  开始-->
<div class="footer_bottom">
  <div class="footer">
    <div class="f_item record"> 2015 年 huodongxun.com 闽ICP备12392193219号 </div>
    <div class="f_item share"> 微信 微博 空间 </div>
    <div class="f_item f_menu"> <a href="#" > 关于我们 </a> | <a href="#" >加入我们</a> | <a href="#" >联系我们</a> | <a href="#" >服务条款</a> | <a href="#" >友情链接</a> </div>
  </div>
</div> 
	<!--底部  结束-->
	<script src="/adminlte/plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<script src="/static/js/WdatePicker.js"></script>
	<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
	<script type="text/javascript">
		var ue = UE.getEditor('container', {
			initialFrameHeight : 400,
			toolbars : [
					[ "source", "undo", "redo", "bold", "italic", "underline",
							"forecolor", "backcolor", "justifyleft",
							"justifycenter", "justifyright", "justifyjustify",
							"indent", "insertunorderedlist",
							"insertorderedlist", "|", "searchreplace",
							"removeformat", "autotypeset" ],
					[ "paragraph", "fontfamily", "fontsize", "rowspacingtop",
							"lineheight", "inserttable", "insertimage",
							"emotion", "horizontal", "spechars", 'link',
							'unlink' ] ]

		});
		$(".tag").click(function() {
			if ($(".tag:checked").length > 2) {
				alert("最大只能勾选2个哦！");
				return false;
			}
		});
		$(document).ready(function() {
			$(".setdate").click(function() {
				var old_val=$(this).val();
				WdatePicker({
					dateFmt : 'yyyy-MM-dd HH:mm:00',
					onpicked:function(dp){	
					    var begin=new Date($("#start_time").val().replace(/-/g,"/"));
					    var end = new Date($("#end_time").val().replace(/-/g,"/"));
					    if(begin>end){
					    	$(this).val(old_val);
					    	alert("开始时间不能大于结束时间！");
					    	return false;
					    }
				    }
				});
			});
			
		});
	</script>
</body>
</html>
